import 'package:wit_shoes/module/Login/login.dart';
import 'package:wit_shoes/module/my/mine.dart';
import 'package:wit_shoes/router/app_router.dart';
import 'package:get/get.dart';
import 'package:wit_shoes/router/router_auth.dart';
import '../module/root/home.dart';
// Import the RouteAuthMiddleware

class AppPage {
  static const INITIAL = AppRoutes.login;
  static final List<GetPage> routes = [
    // 白名单
    GetPage(name: AppRoutes.login, page: () => LoginPage()),
    GetPage(name: AppRoutes.home, page: () => HomePage()),
    GetPage(
      name: AppRoutes.my,
      // Change to a function that returns an instance of MyPage
      page: () => MyPage(),
      middlewares: [
        RouteAuthMiddleware(priority: 1),
      ],
    )
  ];
}
